package com.ssd.controller.operation;


import cn.hutool.core.map.MapUtil;
import com.ssd.entity.dto.request.CouponOperationPageQueryReqDTO;
import com.ssd.entity.dto.response.CouponInfoResDTO;
import com.ssd.service.ICouponService;
import com.ssd.view.BaseResponse;
import com.ssd.viewmodel.Pager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 运营端-我的优惠券表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-21
 */
@RestController("operationCouponController")
@RequestMapping("/operation/coupon")
@Api(tags = "运营端-我的优惠券表控制器")
public class CouponController {
    @Resource
    private ICouponService couponService;

    /**
     * 根据活动id查询优惠券列表
     * @param couponOperationPageQueryReqDTO
     * @return
     */
    @GetMapping("/page")
    @ApiOperation(value = "根据活动id查询下面的优惠券列表")
    public Pager<CouponInfoResDTO> queryForPage(CouponOperationPageQueryReqDTO couponOperationPageQueryReqDTO){
        return  couponService.queryForPage(couponOperationPageQueryReqDTO);
    }


}
